package com.itheima.b_operator;

/**
 * 目标：学习算术运算符
 * <p>
 * +  -  *  /  %
 */
public class Demo01 {

    public static void main(String[] args) {
        int a = 10;
        int b = 3;

        //+  -  *  /  %
        System.out.println(a + b);
        System.out.println(a - b);
        System.out.println(a * 1.0); // int * double--->double
        System.out.println(a / b);
        System.out.println(a % b);

        //使用+和字符串运算，+表示连接符，就是将+左右连接起来
        String s1 = "hello" + 666;
        String s2 = 6 + 6 + 6 + "hello";
        String s3 = 6 + 6 + 'a' + "hello";

        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
    }
}
